<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
angle:<input type="text" id="angle" value=""/><br/><br/>
gltfUrl:<input type="text" id="gltfUrl" value=""/><br/><br/>
height:<input type="text" id="height" value=""/><br/><br/>
lampName:<input type="text" id="lampName" value=""/><br/><br/>
lat:<input type="text" id="lat" value=""/><br/><br/>
lng:<input type="text" id="lng" value=""/><br/><br/>
size:<input type="text" id="size" value=""/><br/><br/>
type:<input type="text" id="type" value=""/><br/><br/>
card:<input type="hidden" id="card" value="" /><br /><br />
　　<input type="button" value="submit" id="submitAB">
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
<script>
    $(function () {
        $("#submitAB").click(function () {
            console.log();
            $.ajax({
                type: 'POST',
                // contentType:'application/json;charset=UTF-8',
                url: "http://localhost:9998/saveLamp",
                datatype: "JSON",
                data: {
                    card: $("#card").val(),
                    angle: $("#angle").val(),
                    gltfUrl: $("#gltfUrl").val(),
                    height: $("#height").val(),
                    id: $("#id").val(),
                    lampName: $("#lampName").val(),
                    lat: $("#lat").val(),
                    size: $("#size").val(),
                    lng: $("#lng").val(),
                    type: $("#type").val(),
                },

                success: function (result) {
                    console.log(result);
                },
                //请求失败，包含具体的错误信息
                error: function (e) {
                    console.log(e.status);
                    debugger
                    console.log(e.responseText);
                }
            })
        })
    })
</script>
</body>
</html>